<?
include("session.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../webkit/utils/jquery.js"></script>
<script type="text/javascript" src="../webkit/grid/import.js"></script>
<script type="text/javascript" src="../webkit/dialog/import.js"></script>
<script type="text/javascript" src="./common.js"></script>
<link type="text/css" rel="stylesheet" href="page.css"/>
</head>
<body>


<table width=100% height=100% cellspacing=0 cellpadding=0>
	<tr bgcolor="#eeeeee">
	<form name=f>
	<td height=30>&nbsp;
	账号状态：<select id="user_status"><option value=''>-请选择-</option><option value='0'>有效</option><option value='-1'>无效</option></select>　
    登录账号：<input type=text id='username' size=12>　
    联系电话：<input type=text id='telephone' size=15>　　 
	<input type="button" value="查询" onclick="search()">　
	</td>
	</tr>
	<tr>
	<td>
		<table id="flex1" style="display:none"></table>
	</td>
	</form>
	</tr>
</table>


<script type="text/javascript">
	var h = parent.document.body.clientHeight-(115+102);
	if(h < 0) h = 'auto'
	$("#flex1").flexigrid({
		url: 'user_query.php?action=list',
		dataType: 'json',
		colModel : [
			{display: 'ID', name : 'a', width : 30, sortable : false, align: 'center'},
			{display: '登录账号', name : 'a', width : 100, sortable : false, align: 'center'},
			{display: '用户姓名', name : 'a', width : 100, sortable : false, align: 'center'},
			{display: '联系电话', name : 'a', width : 100, sortable : false, align: 'center'},
			{display: '用户角色', name : 'a', width : 80, sortable : false, align: 'center'},
			{display: '账号状态', name : 'a', width : 80, sortable : false, align: 'center'},
			{display: '银行户名', name : 'a', width : 100, sortable : false, align: 'center'},
			{display: '银行名称', name : 'a', width : 200, sortable : false, align: 'center'},
			{display: '银行账号', name : 'a', width : 160, sortable : false, align: 'center'},
			{display: '最近登录', name : 'last_login', width : 150, sortable : true, align: 'center'},
            {display: '登录次数', name : 'login_count', width : 80, sortable : true, align: 'center'}
			],
		buttons : [
            {name: '新增', bclass: 'add', onpress : add},     
			{name: '修改', bclass: 'edit', onpress : edit},     
			{name: '删除', bclass: 'del', onpress : del}
		],
		async : true,
		usepager: true,
		title: '用户管理',
		useRp: true,
		rp: 15,
		showTableToggleBtn: false,
		width: 'auto',
		height: h,
		resizable : false,
		singleSelect : true
	});

    
    $('#flex1').dblclick( function (e) { 
        select_row_on_dblclick(e);
        edit();
    }); 

   
	<?
	$add_url = "user_panel.php?op=add";
	$edit_url = "user_panel.php?op=edit&id=";
	$del_url = "user_query.php?action=del&id=";
	$dlg_size = "600,300";
	require("grid_common_js.php");
	?>

	function do_import() {
	
	}

	function search() { 
		var url = "user_query.php?action=list";
        if($("#user_status").val()!="") {
            url += "&user_status="+ $("#user_status").val();
        }      
         if($("#username").val()!="") {
            url += "&username="+ encodeURI($("#username").val());
        }        
		if($("#telephone").val()!="") {
			url += "&telephone="+ $("#telephone").val();
		}
		$('#flex1').flexOptions({'url': url}).flexReload(); 
	}

</script>
</body>
</html>
